<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>我的</title>
    <style>
        /* 全局样式 */

        body {
            font-family: Arial, sans-serif;
            margin: 0;
            padding: 0;
            background-color: lightcoral;
        }


        /* 头部样式 */

        header {
            background-color: orange;
            border-bottom: 1px solid orange;
            padding: 10px 0;
        }

        .header-container {
            width: 90%;
            max-width: 1200px;
            margin: 0 auto;
        }

        .logo {
            float: left;
        }

        .logo img {
            height: 50px;
        }

        .search-bar {
            float: left;
            margin-left: 50px;
            margin-top: 10px;
        }

        .search-bar input {
            padding: 10px;
            border: 1px solid orange;
            border-radius: 4px 0 0 4px;
            width: 300px;
        }

        .search-bar button {
            padding: 10px 20px;
            background-color: #ff4400;
            color: white;
            border: none;
            border-radius: 0 4px 4px 0;
            cursor: pointer;
        }


        /* 搜索按钮悬停效果 */

        .search-bar button:hover {
            background-color: #e63900;
        }

        .user-nav {
            float: right;
            margin-top: 20px;
        }

        .user-nav a {
            margin-left: 15px;
            text-decoration: none;
            color: #333;
        }


        /* 清除浮动 */

        .clearfix:after {
            content: "";
            display: table;
            clear: both;
        }


        /* 导航栏样式 */

        nav {
            background-color: orange;
            border-bottom: 1px solid orange;
        }

        .nav-container {
            width: 90%;
            max-width: 1200px;
            margin: 0 auto;
        }

        .main-nav a {
            display: inline-block;
            padding: 15px 20px;
            text-decoration: none;
            color: #333;
            font-weight: bold;
        }


        /* 导航栏链接悬停效果 */

        .main-nav a:hover {
            color: #ff4400;
            background-color: #ffdab9;
        }


        /* 商品分类和轮播图区域样式 */

        .content-container {
            width: 90%;
            max-width: 1200px;
            margin: 20px auto;
        }

        .category-list {
            width: 5%;
            background-color: #fff;
            border: 1px solid #ddd;
            border-radius: 4px;
            padding: 10px;
            float: left;
        }

        .category-list ul {
            list-style-type: none;
            padding: 0;
            margin: 0;
        }

        .category-list li {
            padding: 10px;
        }

        .category-list li a {
            text-decoration: none;
            color: #333;
        }

        .category-list li a:hover {
            color: #ff4400;
        }

        .slider {
            width: 75%;
            margin-left: 20px;
            height: 300px;
            position: relative;
            overflow: hidden;
            float: left;
        }

        .slider input {
            display: none;
        }

        .slider img {
            width: 100%;
            height: 100%;
            position: absolute;
            opacity: 0;
            transition: opacity 0.5s ease-in-out;
        }


        /* 利用 :checked 伪类控制图片显示 */

        #slide1:checked~.slides img:nth-child(1),
        #slide2:checked~.slides img:nth-child(2),
        #slide3:checked~.slides img:nth-child(3) {
            opacity: 1;
        }


        /* 模拟自动切换，利用 animation 关键帧 */

        .slider .slides img {
            animation: slide 9s infinite;
        }

        .slider .slides img:nth-child(1) {
            animation-delay: 0s;
        }

        .slider .slides img:nth-child(2) {
            animation-delay: 3s;
        }

        .slider .slides img:nth-child(3) {
            animation-delay: 6s;
        }

        @keyframes slide {

            0%,
            30% {
                opacity: 1;
            }

            33%,
            97% {
                opacity: 0;
            }

            100% {
                opacity: 1;
            }
        }


        /* 热门商品推荐区域样式 */

        .hot-products {
            width: 90%;
            max-width: 1200px;
            margin: 20px auto;
            clear: both;
        }

        .hot-products h2 {
            font-size: 24px;
            margin-bottom: 10px;
        }

        .product-item {
            /* 调整宽度，减去左右外边距后一行能放4个 */
            width: calc(25% - 20px);
            background-color: #fff;
            border: 1px solid #ddd;
            border-radius: 4px;
            padding: 10px;
            text-align: center;
            float: left;
            margin: 0 10px 20px 10px;
            transition: box-shadow 0.3s ease-in-out;
        }


        /* 商品项悬停效果 */

        .product-item:hover {
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
        }

        .product-item img {
            width: 100%;
            height: auto;
            margin-bottom: 10px;
        }

        .product-item h3 {
            font-size: 16px;
            margin-bottom: 5px;
        }

        .product-item p {
            color: #ff4400;
            font-weight: bold;
        }


        /* 页脚样式 */

        footer {
            background-color: #f5f5f5;
            border-top: 1px solid #ddd;
            padding: 20px 0;
            text-align: center;
            clear: both;
            background-color: lightblue;
        }

        footer p {
            margin: 0;
            color: grey;
            background-color: lightblue;
        }
    </style>
</head>




<body>
    <!-- 头部 -->
    <header>
        <div class="header-container clearfix">
            <div class="logo">
                <img src="https://img.alicdn.com/tfs/TB1_uT8a5ERMeJjSspiXXbZLFXa-143-59.png">
            </div>
            <div class="search-bar">
                <input type="text" placeholder="搜索商品">
                <button>搜索</button>
            </div>
            <div class="user-nav">
                <a href="#">登录</a>
                <a href="#">注册</a>
                <a href="#">购物车</a>
            </div>
        </div>
    </header>
    <!-- 导航栏 -->

    <nav>
        <div class="nav-container">
            <div class="main-nav">
                <a href="#">首页</a>
                <a href="#">女装</a>
                <a href="#">男装</a>
                <a href="#">数码</a>
                <a href="#">家电</a>
            </div>
        </div>
    </nav>


    <!-- 内容区域 -->
    <div class="content-container clearfix">
        <div class="category-list">
            <ul>
                <li><a href="#">手机</a></li>
                <li><a href="#">电脑</a></li>
                <li><a href="#">美妆</a></li>
                <li><a href="#">母婴</a></li>
                <li><a href="#">食品</a></li>
            </ul>
        </div>


        <div class="slider">
            <input type="radio" name="slide" id="slide1" checked>
            <input type="radio" name="slide" id="slide2">
            <input type="radio" name="slide" id="slide3">
            <div class="slides">
                <img src="../素材/img/横图1.png">
                <img src="../素材/img/横图2.png">
                <img src="../素材/img/横图3.png">
            </div>
        </div>
    </div>




    <!-- 热门商品推荐区域 -->
    <div class="hot-products clearfix">
        <h2>热门商品：</h2>
        <div class="product-item">
            <a href="#" target="_blank">
                <img src="../素材/img/衣服1.jpg">
            </a>
            <h3>布甲</h3>
            <p>￥99.99</p>
        </div>
        <div class="product-item">
            <a href="#" target="_blank">
                <img src="../素材/img/衣服2.jpg">
            </a>
            <h3>锁子甲</h3>
            <p>￥999.99</p>
        </div>
        <div class="product-item">
            <a href="#" target="_blank">
                <img src="../素材/img/衣服2.jpg">
            </a>
            <h3>终极护甲</h3>
            <p>￥9999.99</p>
        </div>
    </div>


    
    <!-- 页脚 -->
    <footer>
        <p>
            版权所有 © 2025 我的淘宝 版权声明 | <a href="#">法律声明</a> | <a href="#">联系我们</a>
            <br> 豫ICP备xxxxxx号-xx 网络文化经营许可证：豫网文[xxxx]xxxx号 增值电信业务经营许可证：豫B2-xxxxxxx
            <br> 东三街奇酷丁真制作 住所地：河南省郑州市金水区东三街 邮编：123123 违法和不良信息举报电话：110
        </p>
    </footer>




    <!-- 点击特效 -->
    <script>
        (function (window, document, undefined) {
            var hearts = [];
            window.requestAnimationFrame = (function () {
                return window.requestAnimationFrame ||
                    window.webkitRequestAnimationFrame ||
                    window.mozRequestAnimationFrame ||
                    window.oRequestAnimationFrame ||
                    window.msRequestAnimationFrame ||
                    function (callback) {
                        setTimeout(callback, 1000 / 60);
                    }
            })();
            init();

            function init() {
                css(".heart{width: 10px;height: 10px;position: fixed;background: #f00;transform: rotate(45deg);-webkit-transform: rotate(45deg);-moz-transform: rotate(45deg);}.heart:after,.heart:before{content: '';width: inherit;height: inherit;background: inherit;border-radius: 50%;-webkit-border-radius: 50%;-moz-border-radius: 50%;position: absolute;}.heart:after{top: -5px;}.heart:before{left: -5px;}");
                attachEvent();
                gameloop();
            }

            function gameloop() {
                for (var i = 0; i < hearts.length; i++) {
                    if (hearts[i].alpha <= 0) {
                        document.body.removeChild(hearts[i].el);
                        hearts.splice(i, 1);
                        continue;
                    }
                    hearts[i].y--;
                    hearts[i].scale += 0.004;
                    hearts[i].alpha -= 0.013;
                    hearts[i].el.style.cssText = "left:" + hearts[i].x + "px;top:" + hearts[i].y + "px;opacity:" + hearts[i].alpha + ";transform:scale(" + hearts[i].scale + "," + hearts[i].scale + ") rotate(45deg);background:" + hearts[i].color;
                }
                requestAnimationFrame(gameloop);
            }

            function attachEvent() {
                var old = typeof window.onclick === "function" && window.onclick;
                window.onclick = function (event) {
                    old && old();
                    createHeart(event);
                }
            }

            function createHeart(event) {
                var d = document.createElement("div");
                d.className = "heart";
                hearts.push({
                    el: d,
                    x: event.clientX - 5,
                    y: event.clientY - 5,
                    scale: 1,
                    alpha: 1,
                    color: randomColor()
                });
                document.body.appendChild(d);
            }

            function css(css) {
                var style = document.createElement("style");
                style.type = "text/css";
                try {
                    style.appendChild(document.createTextNode(css));
                } catch (ex) {
                    style.styleSheet.cssText = css;
                }
                document.getElementsByTagName('head')[0].appendChild(style);
            }

            function randomColor() {
                return "rgb(" + (~~(Math.random() * 255)) + "," + (~~(Math.random() * 255)) + "," + (~~(Math.random() * 255)) + ")";
            }
        })(window, document);
    </script>

</body>

</html>